package com.tjetc.controller;

import com.tjetc.domain.Carousel;
import com.tjetc.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("carousel")
public class CarouselController {
    @Autowired
    private CarouselService carouselService;
    @RequestMapping("findAllCarousel")
    public List<Carousel> findAllCarousel(){
       List<Carousel> list = carouselService.findAllCarousel();
        System.out.println("list = " + list);
       return list;
    }
}
